package com.zsy;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

/**
 * @program: my-springcloud
 * @description: 权限服务
 * @author: zhaoshouyun
 * @create: 2020-04-15 13:05
 **/
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
@MapperScan( {"com.zsy.dao"} )//必须添加扫描mapper否则无法注册mapper
@EnableSwagger2
public class SpringCloudOauth2ServerApplication {

    public static void main(String[] args) {
        SpringApplication.run(SpringCloudOauth2ServerApplication.class,args);
    }

    @Bean
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }
}
